<template>
  <div class="site-wrapper" style="padding: 20px;height:calc(100vh - 60px);overflow:auto;">
    <div class="data-wrapper">
      <el-table :data="tableData" border style="width: 100%">
        <el-table-column align="center" prop="name" label="姓名" min-width="100"></el-table-column>
        <el-table-column align="center" prop="customerCount" label="客户数量" min-width="100"></el-table-column>
        <el-table-column align="center" prop="weekFollow" label="本周跟进数" min-width="100"></el-table-column>
        <el-table-column align="center" prop="monthFollow" label="本月跟进数" min-width="100"></el-table-column>
        <el-table-column align="center" prop="monthPIOrder" label="本月PI数" min-width="100"></el-table-column>
        <el-table-column align="center" prop="monthSignOrder" label="本月成交订单数" min-width="100"></el-table-column>
        <el-table-column align="center" prop="monthSignOrderValue" label="本月成交金额" min-width="100"></el-table-column>
        <el-table-column align="center" prop="monthNewCustomer" label="本月新增客户数" min-width="100"></el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
import dingMixin from "@/mixins/ding";
import formUtil from "@/utils/formUtil";
import {dateUtil} from '@/utils/dateUtil'

export default {
  data() {
    return {
      tableHeight: window.tableHeight,
      tableData: []
    }
  },
  mixins: [dingMixin],
  mounted() {
    this.searchItem(true);
  },
  methods: {
    async searchItem(init) {
      if(init) this.page = 1;
      this.tableData = await this.$httpN.postB('crm/report/followReport',{
        page: this.page,
        limit: this.pageSize
      })
    }
  }
}
</script>

<style lang="scss" scoped>
  .header{
    position: relative;
    padding: 10px 0 0 20px ;
    .filter{
      cursor: pointer;
      float: right;
      margin-right: 30px;
      line-height: 30px;
      img{
        width: 16px;
        margin-right: 3px;
      }
    }
    .mask{
      position: fixed;
      height: 100vh;
      width: 100%;
      top: 0;
      right: 0;
      z-index: 3;
    }
    .filter-wrapper{
      position: absolute;
      width: 315px;
      padding-bottom: 20px;
      background: white;
      top: 48px;
      right: 20px;
      z-index: 99;
      border-radius: 5px;
      box-shadow: 0 0 3px #cbc9c9;
      .filter-header{
        line-height: 30px;
        padding-left: 16px;
        border-bottom: 1px solid #ECECEC;
        margin-bottom: 20px;
      }
      .filter-arrow{
        width:12px;
        height:12px;
        position: absolute;
        top: -6px;
        right: 20px;
        box-shadow: 0 0 3px #cbc9c9;
        transform: rotate(45deg);
      }
      .filter-white{
        width:18px;
        height:18px;
        position: absolute;
        top: -2px;
        right: 17px;
        background: white;
      }
    }
  }
  .data-wrapper{
    padding: 20px 20px;
  }
  .select-btn{
    display: inline-block;
    font-weight: normal;
    margin-right: 5px;
    width: 80px;
    height: 28px;
    border-radius: 30px;
    background: #FAFAFA;
    border: 1px solid #ECECEC;
    position: relative;
    line-height: 28px;
    color: #7982A7;
    font-size: 12px;
    text-align: center;
    position: relative;
    cursor: pointer;
    .del{
      position: absolute;
      top:0;
      left: 0;
      width: 100%;
      height: 100%;
      border-radius: 30px;
      color: white;
      text-align: center;
      background:rgba(130, 130, 130, 0.9);
      display: none;
    }
    &:hover{
      .del{
        display: block;
      }
    }
  }
  .fileitem{
    line-height: 32px;
    margin-bottom: 5px;
    background: #F5F5F5;
    width: 474px;
    padding-left:15px;
    font-size: 12px;
    .uploadtip{
      float:right;
      margin-right: 20px;
      cursor: pointer;
    }
  }
  .addfilebtn{
    cursor: pointer;
    color: #909399;
    display: block;
    font-weight: normal;
  }
</style>